home *** CD-ROM | disk | FTP | other *** search
- /* ====================
- * AEAHandlerGetData.cc
- * ====================
- */
-
- #include "AEADebugging.h"
-
- // Universal Headers
- #include <AEObjects.h>
- #include <AERegistry.h>
-
- // AEA
- #include "AEADescObjectSpecifier.hh"
- #include "AEADescAppleEvent.hh"
- #include "AEAToken.hh"
-
- #include "AEAHandlerGetData.hh"
-
-
- AEAHandlerGetData::AEAHandlerGetData()
- : AEAHandler(kAECoreSuite, kAEGetData)
- {
- MakeNoteToTouchParam(keyDirectObject);
- }
-
- AEAHandlerGetData::~AEAHandlerGetData()
- {
- }
-
- void
- AEAHandlerGetData::HandleEventSelf(const AEADescAppleEvent &inAppleEvent, AEADescAppleEvent &outReply)
- {
- AEADescObjectSpecifier obj;
- AEDesc param;
- AEADesc dataDesc;
-
- // Get the object specifier indicating which data we should return.
- inAppleEvent.GetParameter(keyDirectObject, typeObjectSpecifier, param);
- obj.Ref() = param;
- // Resolve the object specifier into a token.
- AEAMetatoken token(obj.Resolve());
-
- obj.Dispose();
- // Make a descriptor for the data represented by the token.
- // (This could be a simple type, another object specifier, a list, etc.)
- token.MakeDataDescriptor(dataDesc.Ref());
-
- // Put the data into the reply.
- outReply.PutParameter(keyDirectObject, dataDesc);
- }
-